package recursion

// https://leetcode-cn.com/problems/combination-sum/
// 组数总和
// 算法: 递归
// 时间复杂度: O(mn), O(nlog(n))
var (
	retArr = make([][]int, 0)
)

func combinationSum(candidates []int, target int) [][]int {
	emptyArr := make([]int, 0)
	for index := 0; index < len(candidates); index++ {
		recurForSum(candidates, index, 0, target, emptyArr)
	}
	return retArr
}

func recurForSum(candidates []int, index int, sum int, target int, currentArr []int) {
	// 当前剩余的步长已经超过了当前
	//if
}
